package com.brillilab.service.module.message.template.impl.space;

import com.brillilab.service.module.message.template.AbstractMessageTemplate;
import com.brillilab.service.module.message.template.enums.MessageTypeEnum;
import lombok.Data;

/**
 * @author zlb
 * @Title: ReagentBoxToPrivateTemp
 * @ProjectName brill_lab
 * @Description: 试剂盒被修改为个人私有成功
 * @date 2019/5/27 16:26
 */
@Data
public class ReagentBoxToPrivateTemp extends AbstractMessageTemplate {

    private String labName;
    private Integer deviceNo;
    private String planeNo;
    private Integer boxNo;
    private String operator;

    /**
     * 试剂盒被修改为个人私有成功
     *
     * @param labId       实验ID
     * @param receiverId  接收人ID
     * @param labMemberId 接收者实验室成员Id
     * @param labName     实验室名称
     * @param deviceNo    设备编号
     * @param planeNo     平面序号
     * @param boxNo       试剂盒序号
     * @param operator    操作人
     */
    public ReagentBoxToPrivateTemp(Long labId, Long receiverId, Long labMemberId, String labName, Integer deviceNo, String planeNo, Integer boxNo, String operator) {
        super(labId, receiverId);
        super.setType(MessageTypeEnum.ReagentBoxToPrivate.getValue());
        super.setTitle("试剂盒已设置为您私有");
        String content = String.format("<span style='color:#F6AC2D'>%s</span>" + "<span>的</span>" +
                        "<span style='color:#F6AC2D'>%s</span>" + "<span>设备内</span>" +
                        "<span style='color:#F6AC2D'>%s</span>" + "<span>平面内的</span>" +
                        "<span style='color:#F6AC2D'>%s</span>" + "<span>号试剂盒已被</span>" +
                        "<span style='color:#F6AC2D'>%s</span>" +
                        "<span>设置为您私有,如有疑问请联系实验室管理员</span>",
                labName, deviceNo, planeNo, boxNo, operator);
        super.setContent(content);
        super.setAppContent(String.format("%s的%s设备内%s平面内的%s号试剂盒已被%s设置为您私有,如有疑问请联系实验室管理员",
                labName, deviceNo, planeNo, boxNo, operator));
        this.labName = labName;
        this.deviceNo = deviceNo;
        this.planeNo = planeNo;
        this.boxNo = boxNo;
        this.operator = operator;
        this.labMemberId = labMemberId;
    }

}
